home *** CD-ROM | disk | FTP | other *** search
- Path: Rezonet.net!news
- From: ray@ultimate-tech.com (Ray Dunn)
- Newsgroups: comp.lang.c
- Subject: Re: *Pointer to Functions(); /* HELP */
- Date: 24 Jan 1996 21:04:05 GMT
- Organization: Ultimate Technographics Inc.
- Message-ID: <4e66s5$dvl@ns.RezoNet.NET>
- References: <4dvrq8$c2c@news.unicomp.net> <TANMOY.96Jan22085051@qcd.lanl.gov>
- NNTP-Posting-Host: 204.19.230.7
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.7
-
- In referenced article, Tanmoy Bhattacharya says...
- >Jerry_Gore writes:
- > void InstallTimer0(WORD period,void far (*func)(void));
- ><snip>
- > void far animate(void) /* I added 'far' for no good reason. */
- > { /* It uses that name in InstallTimer0. */
- > /* do what ever */
- > return;
- > }
- >
- > How do I send InstallTimer0 the pointer to my function animate ???
- > I tried:
- >
- > InstallTimer0(120 , (*animate)());
- >
- >First, with the far in place, I cannot answer: the code is a syntax
- >error in C, and every conformant C compiler has to diagnose it as
- >such.
-
- It would be pleasant if we could save a lot of people embarassment from
- this continuing 'C' ANSI snobbery when they post genuine questions in
- all innocence.
-
- Unless posts *specifically* question the use of the "far", "near", etc.,
- keywords of that well-known flavour of 'C', and ask legitimate ANSI 'C'
- based questions, then those keywords can be *ignored* for the purposes
- of this group.
-
- There is a *big* difference between someone posting a question based on
- the infamous "void main(void)", or other illegal use of constructs
- clearly defined in ANSI, and some posted code which contains extensions
- necessary for the real world system environemnts that most of us have to
- exist in when we're not just being language lawyers.
-
- This gripe is not specifically targeted at Tanmoy, whom we should thank
- for his continuing helpful responses, but he is particularly crotchetty
- in this area.
-
- >InstallTimer0(120,animate) is probably the simplest way to do what you
- >want.
-
- ...and is all that was needed to be said.
- --
- Ray Dunn (opinions are my own) | Phone: (514) 938 9050
- Montreal | Phax : (514) 938 5225
- ray@ultimate-tech.com | Home : (514) 630 3749
-
-